.optimized-image-container {
  position: relative;
  overflow: hidden;
  background-color: #f5f7fa;
  width: 100%;
  height: 100%;

  .optimized-image {
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
  }

  &.loaded .optimized-image {
    opacity: 1;
  }

  .image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #909399;
    font-size: 24px;
    transition: opacity 0.3s ease-in-out;
  }

  &.loaded .image-placeholder {
    opacity: 0;
    pointer-events: none;
  }

  /* 添加淡入动画 */
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: scale(0.9);
    }
    to {
      opacity: 1;
      transform: scale(1);
    }
  }

  &.loaded {
    animation: fadeIn 0.3s ease-in-out;
  }
}